package translinkApp.Data.Parse.Locations;

import java.io.IOException;
import java.util.ArrayList;

import android.content.Context;

import translinkApp.Data.Parse.KeyPair;
import translinkApp.Data.Parse.Poster;

public class GetLocationData extends Poster {

	public String getData(Context c, String street, String suburb) throws IOException {
		ArrayList<KeyPair> params = new ArrayList<KeyPair>();
		if (!suburb.equals("")) {
			params.add(new KeyPair("FromSuburb", suburb));
		}
		if (!street.equals("")) {
			params.add(new KeyPair("FromStreet", street));
		}
		params.add(new KeyPair("ToSuburb", "z"));

		return getData(c, "http://mobile.jp.translink.com.au/travel-information/journey-planner",
				params);

	}
}